package io.renren.constant;

/**
 *
 * APP常量
 * 
 * @author Administrator
 * 
 */
public enum AppConstant {
	STATU_SUCCESS("SUCCESS", "000"),
	STATU_FAIL("FAIL", "999"), 
	SYSTEM_IS_EXCEPTION("EXCEPTION", "500"),
	PARAM_IS_MISS("PARAM IS MISS", "406"), 
	FILE_TYPE_IS_NULL("FILE TYPE IS NULL", "407"),
	TOKEN_EXCEPTION("TOKEN EXCEPTION", "013"),
	TOKEN_EXPIRE("TOKEN EXPIRE", "015"),
	THINGS_HAVE_BEAN_DONE("THINGS HAVE BEEN DONE","600"),
    CONDITION_NOT_SATISFIED("CONDITION NOT SATISFIED", "700");

    // 成员变量
    private String name;  
    private String value;  
    // 构造方法  
    private AppConstant(String name, String value) {  
        this.name = name;  
        this.value = value;  
    }  
    // 普通方法  
    public static String getName(String index) {  
        for (AppConstant c : AppConstant.values()) {  
            if (c.getValue().equals(index)) {  
                return c.name;  
            }  
        }  
        return null;  
    }  
    // get set 方法  
    public String getName() {  
        return name;  
    }  
    public void setName(String name) {  
        this.name = name;  
    }  
    public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	
}
